package com.sf.fy.uav.common.enums;

import lombok.Getter;

/**
 * @author LTQ
 */
@Getter
public enum RescueOrderStatusEnum {

    /**
     *
     */
    TO_BE_PAID(-1, "待付款"),

    WAITING_FOR_ORDER_ACCEPTANCE(0, "等待平台接单"),

    MATERIAL_PREPARATION(1, "物资准备中"),

    IN_TRANSIT(2, "⽆⼈机运输中"),

    COMPLETED(4, "已完成"),


    CANCEL(6, "付款后取消"),
    EXPIRE(7, "已过期"),

    CANCEL_BEFORE_PAYMENT(8, "付款前取消");


    private Integer status;
    private String name;


    RescueOrderStatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getName(Integer status) {
        for (RescueOrderStatusEnum ele : values()) {
            if (ele.getStatus().equals(status)) {
                return ele.getName();
            }
        }
        return null;
    }
}
